package events.animation;

import gui.SnazzySpritesGUI;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import renderer.SceneRenderer;
import snazzysprites.SnazzySprites;
import state.SnazzySpritesStateManager;

/**
 * The StartAnimationHandler class responds to when the user
 * requests to start animation.
 * 
 * @author  Richard McKenna
 *          Debugging Enterprises
 * @author Andrew Gratta
 * @version 1.0
 */
public class StartAnimationHandler implements ActionListener
{  
    /**
     * Here's the actual method called when the user clicks the 
     * start animation method, which results in unpausing of the
     * renderer, and thus the animator as well.
     * 
     * @param ae Contains information about the event.
     */
    @Override
    public void actionPerformed(ActionEvent ae)
    {
        SnazzySprites singleton = SnazzySprites.getSnazzySprites();
        SnazzySpritesGUI gui = singleton.getGUI();       
        gui.getPreviewRenderer().unpauseScene();
    }
}